<?php


/**
 * Skeleton subclass for representing a row from the 'menu' table.
 *
 * 
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 * @package    propel.generator.database
 */
class Menu extends BaseMenu {
     
     public function getModules()
    {
       $rank =  core::$user->is_ingelogd() ? core::$user->getUser()->getRank() : '0' ;
       $c = new Criteria();
       $c->addAscendingOrderByColumn(ModulePeer::VOLGORDE);
       $c->add(ModulePeer::RANK, $rank, criteria::LESS_EQUAL); 
       return parent::getModules($c);     
    }
    
    public function getAllModules()
    {
        $c = new Criteria();
        $c->addAscendingOrderByColumn(ModulePeer::VOLGORDE);
        return parent::getModules($c);
    }

} // Menu
